Repository navigation
Dispatchers: remove selectors, which nothing calls - #4635
Merged
Merged
Conversation
alex
force-pushed
the
claude/charming-archimedes-aj5193-aes-gcm
branch
from
November 8, 2026 14:38
28bd86f to
1ee0a6e
Compare
alex
force-pushed
the
claude/charming-archimedes-aj5193-no-selectors
branch
from
November 8, 2026 14:38
4478e43 to
305ec33
Compare
alex
force-pushed
the
claude/charming-archimedes-aj5193-no-selectors
branch
from
November 8, 2026 15:05
480c7dc to
ac5f643
Compare
|
This pull request has conflicts with Posted by |
Base automatically changed from
claude/charming-archimedes-aj5193-aes-gcm
to
main
November 8, 2026 15:07
A selector (`<function>_select`, `VG.Rust.selector`) returned the implementation a dispatcher would run, for the Rust code to choose once and call without choosing again; `VG.Dispatch.selected` listed the functions that got one. AES-GCM, their only caller, now calls the dispatchers, which choose once themselves. This removes the selectors from the trusted printer (`Rust.selector`, `Rust.Selected`), the emitter (`files`, `run` and the driver's `#assert_no_compiler_overrides`), the list in `Dispatch.lean`, their tests, and the generated `_select` functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFCSTvQuX83u32Ae29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFCSTvQuX83u32Ae29
alex
force-pushed
the
claude/charming-archimedes-aj5193-no-selectors
branch
from
November 8, 2026 15:12
ac5f643 to
429fb1d
Compare
alex
enabled auto-merge
November 8, 2026 15:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4629 (itself on #4623); only the top commit is this PR's.
Selectors (
<function>_select,VG.Rust.selector) returned the implementation a dispatcher would run, so that Rust code could choose once and call it without choosing again;VG.Dispatch.selectedlisted which functions got one. Their only caller was AES-GCM, which calls the dispatchers since #4629, and since #4623 the dispatchers choose once themselves. So this deletes them:TCB/Rust.lean:Selected,selectName,selector, their documentation, and theselectedparameters ofdispatchersandfileswith the check that each named function has a dispatcher.TCB/Emit.lean: theselectedargument ofrun, andVG.Dispatch.selectedin the driver'smainand#assert_no_compiler_overrides.Dispatch.lean:selected.VerifiedGarbageTest/Dispatch.lean: the selector tests._selectfunctions (−1,156 lines across the x86-64, AArch64, x86, ARM, POWER and RISC-V crates).Trust change
Removal only: the trusted printer loses a function and the emitter an input. No dispatcher's text changes, and nothing else in the generated crates does.
It also unblocks
EmitOne.leanon x86-64 and AArch64 registration files, which stopped atvg_aes_gcm_…: has a selector (VG.Dispatch.selected) but no dispatcher, since it sees only one file's artifacts. With this,EmitOne --check Rc2.AArch64passes;Md5.X86_64andPoly1305.AArch64still report their module file out of date, for a reason unrelated to these PRs (run alone,EmitOneleaves out the#[path = "internal/…"] mod …;declarations the full emitter writes; the files are the same asmain's).Testing
lake build +VerifiedGarbageTest.Dispatch,lake env lean --run Emit.lean, the static-checks job's steps, andci/check_lean_public_imports.pyon the edited modules.cargo clippy --all-targets -D warningsfor x86-64, aarch64 (Linux, Apple), i686, armv7, riscv64 and powerpc64le;cargo test --releasewith Wycheproof on x86-64.No benchmark: nothing called the removed functions, so no code that runs changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHFCSTvQuX83u32Ae29